<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
	<jsp:include page="../common/top.jsp"></jsp:include>
	<!-- ================== PAGE LEVEL STYLE START ================== -->
	<link rel="stylesheet" href="resource/assets/data-table/css/data-table.css" />
	<!-- ================== PAGE LEVEL STYLE END ================== -->
	
    <jsp:include page="../common/left.jsp"></jsp:include>
  
    <div id="content">
    <div class="container-fluid">
			<h1 class="page-title">添加角色 <small>在这里进行添加角色 </small></h1>
			<div class="row-fluid">
				<div class="span12">
					<div class="widget">
						<div class="widget-header">
							<h4>添加角色</h4>
						</div>
						<div class="widget-content">
						<form id="replyform" method="post" action="GrantPowerAction!addRole.action">
							<div class="control-group">
								<label class="control-label" for="rolename">角色名称</label>
								<div class="controls">
									<input type="text" name="role.name" id="rolename" placeholder="请输入角色名称">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="roleremark">角色描述</label>
								<div class="controls">
									<input type="text" name="role.remark" id="roleremark" placeholder="请输入角色描述">
								</div>
							</div>
							 <s:iterator value="ps" var="p">
				        	    <div style="width:120px; margin-right:60px; min-height:90px; margin-bottom:20px; float: left;">
				        	    	 <label><input class="checkboxRe" name="ids"  value="<s:property value='#p.id'/>"  type="checkbox" checked="checked"><s:property value="#p.name"/> </label>
				        	    	 <div style="float:right;">
				        	    	 	<s:if test="#p.powers.size>0">
				        	    	 		<s:iterator value="#p.powers" var="power">
				        	    	 			<label><input   name="ids" value="<s:property value='#power.id'/>"  class="sunCheckBox" type="checkbox" checked="checked"><s:property value="#power.name"/> </label>
				        	    	 		</s:iterator>
				        	    	 	</s:if>
				        	    	 </div>
				        	    </div>
		        			</s:iterator>
			        		<div style="float:right;margin-right:30px">
								<input type="reset" value="取消" style="margin-right:30px">
								<input type="submit" value="添加">
							</div>
							</form>	
							 </div>
							<div class="clearfix"></div>
							
						</div>
					</div>
				</div><!-- end span12 -->
			</div><!-- end row-fluid -->
		</div><!-- end container-fluid -->
    
    	
    </div>
    <jsp:include page="../common/footer.jsp"></jsp:include>
    
    <!-- ================== PAGE LEVEL PLUGINS START ================== -->
	<script src="resource/assets/data-table/js/jquery-data-table.js"></script>
	<script src="resource/assets/data-table/js/data-table.js"></script>
	<!-- ================== PAGE LEVEL PLUGINS END ================== -->
    
    <jsp:include page="../common/foot.jsp"></jsp:include>
    
</html>
